package com.example.personnel_oa.controller;

import com.example.comment_oa.pojos.Source;
import com.example.comment_oa.response.AjaxResponse;
import com.example.personnel_oa.service.SourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("personnelOa")
public class sourceController {
    @Autowired
    SourceService service;

    @PostMapping("source/selectlist")
    public AjaxResponse selectlist(){
        List<Source> selectlist = service.selectlist();
        return AjaxResponse.success(selectlist);
    }
}
